package com.crm.business.admin.mapper;

import com.alibaba.fastjson.JSONObject;
import com.crm.common.admin.entity.BO.AdminMessageQueryBO;
import com.crm.common.admin.entity.VO.AdminMessageVO;
import com.crm.common.ka.core.entity.BasePage;
import com.crm.common.ka.core.feign.admin.entity.AdminMessage;
import com.crm.business.servlet.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 系统消息表 Mapper 接口
 * </p>
 *
 * @author zhangzhiwei
 * @since 2020-04-27
 */
public interface AdminMessageMapper extends BaseMapper<AdminMessage> {
    public BasePage<AdminMessage> queryList(BasePage<AdminMessage> parse, @Param("data") AdminMessageQueryBO adminMessageBO);

    public AdminMessageVO queryUnreadCount(@Param("userId") Long userId);

    /**
     * 消息列表查询
     * @param parse
     * @param adminMessageBO
     * @return
     */
    public BasePage<AdminMessage> queryPageList(BasePage<AdminMessage> parse, @Param("data") AdminMessageQueryBO adminMessageBO);

    public JSONObject queryMessageNum(@Param("userId") Long userId);
}
